package com.example.demo.chain.filter;

/**
 * @author liyuncong
 * @version 1.0
 * @file AbstractFilter
 * @brief AbstractFilter
 * @details AbstractFilter
 * @date 2022-11-02
 *
 * Edit History
 * ----------------------------------------------------------------------------
 * DATE                        NAME               DESCRIPTION
 * 2022-11-02                      liyuncong          Created
 */

import java.util.List;

/**
 * 过滤器模式，我理解为，对一组数据进行筛选过滤，
 * 筛选的数据或筛选剩余的数据都可以作为目标数据
 */
public abstract class AbstractFilter<T> {

    protected List<T> nextDoFilters;

    protected List<T> match;

    public List<T> currentMatch() {
        return match;
    }

    public List<T> getNextDoFilters() {
        return nextDoFilters;
    }

    public abstract void doFilter(List<T> data);
}
